package com.wuwei.jy.controller;

import com.wuwei.jy.domain.g.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.wuwei.dto.ComResult;
import com.wuwei.jy.Service.NewsSv;

@Controller
@RequestMapping("/test")
public class TestController {
	private NewsSv newsSv;

	@RequestMapping("/home")
	public String home() {

		return "/admin/test";

	}

	@ResponseBody
	@RequestMapping("/testjson")
	public ComResult<User> TestJson() {
		User obj = new User();
		
//		obj=getNewsSv().GetById(1);
		return new ComResult<User>(true,obj,"");
	}

	public NewsSv getNewsSv() {
		return newsSv;
	}

	@Autowired
	public void setNewsSv(NewsSv newsSv) {
		this.newsSv = newsSv;
	}

}
